<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Base64Encoder</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">Base64Encoder()</font></b></p>
<p><b>Syntax</b></p><blockquote>

Result = <font color="#006666"><b>Base64Encoder</b></font>(*InputBuffer, InputSize, *OutputBuffer, OutputSize [, Flags])    </blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Encodes the specified buffer using the Base64 algorithm. This is widely used in e-mail 
programs but can be useful for any other programs which need an ASCII only (7 bit, only 
from 32 to 127 characters) encoding for raw binary files. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>*InputBuffer</i></td>
<td width="90%"> 
 
The buffer containing the plain data. 

 

</td></tr>
<tr><td><i>InputSize</i></td>
<td> 
 
The size of the input buffer. 

 

</td></tr>
<tr><td><i>*OutputBuffer</i></td>
<td> 
 
The output buffer where the encoded data will be copied. 

 

</td></tr>
<tr><td><i>OutputSize</i></td>
<td> 
 
The size of the output buffer. 
<br>
<br>
The output buffer should be at last 33% bigger than the input buffer, with a minimum size of 64 bytes. 
It's recommended to get a slightly larger buffer, like 35% bigger to avoid overflows. 

 

</td></tr>
<tr><td><i>Flags (optional)</i></td>
<td> 
 
It can be a combination of the following values: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Cipher_NoPadding</font>: it will not insert additional '=' at the end of the encoded buffer to pad it to 3 bytes boundary.
  <font color="#924B72">#PB_Cipher_URL</font>      : it will use a slightly different encoding, mainly used in URL. The usual '+' and '/' encoded characters
                        will be respectively encoded to '-' and '_'
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>



Returns the length of the encoded data in bytes. 

 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  Example$ = "This is a test string!" 
  Decoded$ =<font color="#006666"> Space</font>(1024) 
  Encoded$ =<font color="#006666"> Space</font>(1024) 
    
  <b><font color="#006666">Debug</font></b> <font color="#006666">Base64Encoder</font>(@Example$,<font color="#006666"> StringByteLength</font>(Example$), @Encoded$, 1024)
  <b><font color="#006666">Debug</font></b> Encoded$ 
    
  <b><font color="#006666">Debug</font></b> <font color="#006666">Base64Decoder</font>(@Encoded$,<font color="#006666"> StringByteLength</font>(Encoded$), @Decoded$, 1024)
  <b><font color="#006666">Debug</font></b> Decoded$
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="base64decoder.html">Base64Decoder()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=base64decoder.html>Base64Decoder()</a> - <a href=index.html>Cipher Index</a> - <a href=crc32filefingerprint.html>CRC32FileFingerprint()</a> -&gt;



</body></html>